-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor of clauses #662
Refactor of clauses #662
Conversation
This is quite subtle because we need to make sure to either always hash the clause/predicate with its binder or never do that. Could you split this in a few commits that each do a single thing (e.g. 1. define |
Yes, I'm gonna rebase this nicely, no worries! After this PR, we should never compute a |
No problem, let me know when you have a version I can look at |
…`s and `Clause`s In commit [fca56a], the type `Clause` has been renamed as `ClauseKind`, then commit [21226e] makes `Clause` a `Binder<ClauseKind>`, essentially (with an indirection via `PredicateKind` and an invariant where the predicate kind has to be a `ty::PredicateKind::Clause(ClauseKind)`). That means that now, Rustc always provides `Clause` with binders. Thus, it now makes sense to systematically compute clause identifiers with binders. Since clauses are a subset of predicates, we now always lift clauses to predicates before computing identifiers. This was not possible before, since we lacked binder information to properly lift clauses to predicates [fca56a]: rust-lang/rust@fca56a8 [21226e]: rust-lang/rust@21226ee
This PR implements the changes discussed in #661.
Fixes #661